package com.orangelife.webservice.service.feedetail;

import java.util.List;
import java.util.Map;

import javax.jws.WebParam;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.apache.cxf.jaxrs.ext.multipart.Multipart;

import com.orangelife.exception.AppBizException;
import com.orangelife.service.feeDetail.modal.PropFeeDetailDto;
import com.orangelife.webservice.service.feedetail.entity.ChangeFeeTypeDto;

public interface IFeeDetailWebService {

	/**
	 * 功能：获取房屋的可使用预交款
	 * 
	 * @param request
	 * @param apartmentID
	 * @param commID
	 * @return
	 * @throws Exception
	 * */
	@GET
	@Path("/getPreAmount")
	@Produces({ "application/json" })
	public Response getAmonutByApartmentID(@Context HttpServletRequest request,
			@QueryParam("commID") String commID,
			@QueryParam("apartmentID") String apartmentID) throws Exception,
			AppBizException;

	/**
	 * 功能:导入欠费信息
	 * 
	 * @author ztw
	 * */
	@POST
	@Path("/_import")
	@Consumes({ "multipart/form-data" })
	@Produces({ "application/json" })
	public Response importFeeDetail(@Context HttpServletRequest servletRequest,
			@Context HttpServletResponse servletResponse,
			@Multipart("file") Attachment attachments,
			@Multipart("commID") String commID, @Multipart("ispre") String ispre)

	throws Exception;

	/****
	 * 下载历史缴费记录
	 * 
	 * @param servletRequest
	 * @param servletResponse
	 * @param search
	 * @param commID
	 * @param comm
	 * @return
	 * @throws Exception
	 */
	@GET
	@Path("downFeeDetailHistory")
	@Consumes({ "application/json" })
	@Produces(MediaType.APPLICATION_OCTET_STREAM)
	public Response downFeeDetailHistory(
			@Context HttpServletRequest servletRequest,
			@Context HttpServletResponse servletResponse,
			@QueryParam("search") String search,
			@QueryParam("commID") String commID, @QueryParam("comm") String comm)
			throws Exception;

	/***
	 * 导入历史缴费记录
	 * 
	 * @param servletRequest
	 * @param servletResponse
	 * @param attachments
	 * @return
	 * @throws Exception
	 */
	@POST
	@Path("/importFeeDetailHistory")
	@Consumes({ "multipart/form-data" })
	@Produces({ "application/json" })
	public Response ImportFeeDetailHistory(
			@Context HttpServletRequest servletRequest,
			@Context HttpServletResponse servletResponse,
			@QueryParam("commID") String commID,
			@QueryParam("importType") String importType,
			List<Attachment> attachments) throws Exception;

	/***
	 * 导入历史缴费记录
	 * 
	 * @param servletRequest
	 * @param servletResponse
	 * @param attachments
	 * @return
	 * @throws Exception
	 */
	@POST
	@Path("/importFeeHistory")
	@Consumes({ "multipart/form-data" })
	@Produces({ "application/json" })
	public Response ImportFeeHistory(
			@Context HttpServletRequest servletRequest,
			@Context HttpServletResponse servletResponse,
			@QueryParam("commID") String commID,
			@QueryParam("importType") String importType,
			List<Attachment> attachments) throws Exception;

	/**
	 * 用途 查询列表（橙子生活）
	 * 
	 * @author zhr
	 * @date 创建时间 2016-08-01 12:03:30
	 * @param servletRequest
	 * @param search
	 *            搜索内容
	 * @param tsCreate
	 *            创建时间
	 * @param pageIndex
	 *            页码
	 * @param pageSize
	 *            页面大小
	 * @return
	 * @throws Exception
	 */
	@GET
	@Produces({ "application/json" })
	public Response getAllPropFeeDetail(
			@Context HttpServletRequest servletRequest,
			@QueryParam("commID") String commID,
			@QueryParam("feeDate") String feeDate,
			@QueryParam("feeTypeID") String feeTypeID,
			@QueryParam("status") String status,
			@QueryParam("search") String search,
			@QueryParam("tsCreate") String tsCreate,
			@QueryParam("pageIndex") String pageIndex,
			@QueryParam("pageSize") String pageSize) throws Exception;

	/**
	 * 用途 修改（橙子生活）
	 * 
	 * @author zhr
	 * @date创建时间 2016-08-16 18:23:28
	 * @param servletRequest
	 * @param propFeeDetail
	 * @return
	 * @throws Exception
	 */
	@PUT
	@Path("/edit")
	@Produces({ "application/json" })
	public Response editPropFeeDetail(
			@Context HttpServletRequest servletRequest,
			@WebParam PropFeeDetailDto propFeeDetail) throws Exception;

	/**
	 * 用途 修改（橙子生活）
	 * 
	 * @author zhr
	 * @date创建时间 2016-08-16 18:23:28
	 * @param servletRequest
	 * @param propFeeDetail
	 * @return
	 * @throws Exception
	 */
	@PUT
	@Path("/errEdit")
	@Produces({ "application/json" })
	public Response errEdit(
			@Context HttpServletRequest servletRequest,
			@WebParam PropFeeDetailDto propFeeDetail) throws Exception;
	/**
	 * 用途 删除（橙子生活）
	 * 
	 * @date 创建时间 2016-08-16 18:23:28
	 * @author zhr
	 * @param servletRequest
	 * @param feeDetailID
	 * @return
	 * @throws Exception
	 */
	@DELETE
	@Path("{feeDetailID}")
	@Produces({ "application/json" })
	public Response deletePropFeeDetail(
			@Context HttpServletRequest servletRequest,
			@PathParam("feeDetailID") String feeDetailID,@QueryParam("commID") String commID) throws Exception;
	@DELETE
	@Path("errDel/{feeDetailID}")
	@Produces({ "application/json" })
	public Response errDel(
			@Context HttpServletRequest servletRequest,
			@PathParam("feeDetailID") String feeDetailID,@QueryParam("commID") String commID) throws Exception;

	/**
	 * 用途 详情（橙子生活）
	 * 
	 * @date 创建时间 2016-08-16 18:23:28
	 * @author zhr
	 * @param servletRequest
	 * @param feeDetailID
	 * @return
	 * @throws Exception
	 */
	@GET
	@Path("{feeDetailID}/")
	@Produces({ "application/json" })
	public Response findPropFeeDetailByID(
			@Context HttpServletRequest servletRequest,
			@PathParam("feeDetailID") String feeDetailID) throws Exception;

	/****
	 * 批量删除
	 * 
	 * @param servletRequest
	 * @param propFeeDetail
	 * @return
	 * @throws Exception
	 */
	@PUT
	@Path("/bauthdeleteFeeDetail")
	@Produces({ "application/json" })
	public Response bauthdeleteFeeDetail(
			@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> propFeeDetail) throws Exception;

	/***
	 * 通过缴费日期和小区批量删除缴费西厢
	 * 
	 * @param servletRequest
	 * @param propFeeDetail
	 * @return
	 * @throws Exception
	 */
	@PUT
	@Path("/deleteFeeDetail")
	@Produces({ "application/json" })
	public Response deleteFeeDetail(@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> propFeeDetail) throws Exception;

	/****
	 * 查询导入日志
	 * 
	 * @param servletRequest
	 * @param commID
	 * @param search
	 * @param pageIndex
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	@GET
	@Path("logInfos")
	@Produces({ "application/json" })
	public Response getLogInfos(@Context HttpServletRequest servletRequest,
			@QueryParam("commID") String commID,
			@QueryParam("search") String search,
			@QueryParam("pageIndex") String pageIndex,
			@QueryParam("pageSize") String pageSize) throws Exception;

	@POST
	@Path("/detail")
	@Produces({ "application/json" })
	public Response ImportFeeHistory(@WebParam Map<String, Object> map)
			throws Exception;

	@POST
	@Path("/bauthfinds")
	@Produces({ "application/json" })
	public Response bauthFindPropFeeDetails(
			@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> propFeeDetail) throws Exception;

	@POST
	@Path("/bauthSearch")
	@Produces({ "application/json" })
	public Response bauthSearchPropFeeDetails(
			@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> propFeeDetail) throws Exception;
	
	

	@POST
	@Path("/feeDetails")
	@Produces({ "application/json" })
	public Response getFeeDetails(
			@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> propFeeDetail) throws Exception;
	
	
	@POST
	@Path("/changefeeDetailType")
	@Produces({ "application/json" })
	public Response changefeeDetailType(
			@Context HttpServletRequest servletRequest,
			@WebParam ChangeFeeTypeDto changeDto) throws Exception;
	
	
	
	/**
	 * 用途 查询列表月度缴费单（橙子生活）
	 * 
	 * @author zhr
	 * @date 创建时间 2016-08-01 12:03:30
	 * @param servletRequest
	 * @param search
	 *            搜索内容
	 * @param tsCreate
	 *            创建时间
	 * @param pageIndex
	 *            页码
	 * @param pageSize
	 *            页面大小
	 * @return
	 * @throws Exception
	 */
	@GET
	@Produces({ "application/json" })
	@Path("/monFeeList")
	public Response monFeeList(
			@Context HttpServletRequest servletRequest,
			@QueryParam("commID") String commID,
			@QueryParam("apartmentID") String apartmentID,
			@QueryParam("pageIndex") String pageIndex,
			@QueryParam("pageSize") String pageSize) throws Exception;

	/**
	 * 用途 查询列表（橙子生活）
	 * 
	 * @author zhr
	 * @date 创建时间 2016-08-01 12:03:30
	 * @param servletRequest
	 * @param search
	 *            搜索内容
	 * @param tsCreate
	 *            创建时间
	 * @param pageIndex
	 *            页码
	 * @param pageSize
	 *            页面大小
	 * @return
	 * @throws Exception
	 */
	@GET
	@Produces({ "application/json" })
	@Path("/monDetail")
	public Response monDetail(
			@Context HttpServletRequest servletRequest,
			@QueryParam("commID") String commID,
			@QueryParam("feeDate") String feeDate,
			@QueryParam("apartmentID") String apartmentID) throws Exception;
	

	@POST
	@Path("/moreFeeDetail")
	@Produces({ "application/json" })
	public Response getMoreFeeDetail(
			@Context HttpServletRequest servletRequest,
			@WebParam Map<String, Object> params) throws Exception;
}
